#include <stdio.h>
typedef enum { false, true } boolean;

boolean isblank(char c);

int main()
{
  char c=(char)1;
  boolean last_char_was_blank=true; //starting	with blank.
  while( c != EOF )
  {
    c = getchar();
    if (!last_char_was_blank || !isblank(c))
      {
	   if (!isblank(c) && c != EOF)
		{ putchar(c); }
	   else
		{ putchar(' '); }
      }
    last_char_was_blank = isblank (c) == true ? true : false;
   }
  return (0);
}

boolean isblank(char c)
{
  if (c==' ')
    return true;
  if (c=='\n')
    return true;
  if (c=='\t')
    return true;
  return false;
} 
